package com.icedevcloud.upms.controller.admin.dept.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

/**
 * <p>
 * 新增部门ReqDto
 * </p>
 *
 * @author dengbing
 * @since 2023-08-13
 */
@Schema
@Data
public class AddDeptReqDto {

    @NotNull(message = "父ID不能为空")
    @Schema(description = "父ID")
    private Long pid;

    @Size(min = 3, max = 20, message = "部门名称长度为3-20个字符")
    @NotBlank(message = "部门名称不能为空")
    @Schema(description = "部门名称")
    private String deptName;

    @NotNull(message = "排序号不能为空")
    @Schema(description = "排序号")
    private Integer sort;

    @NotNull(message = "状态不能为空")
    @Max(value = 1, message = "状态只能为0或1")
    @Min(value = 0, message = "状态只能为0或1")
    @Schema(description = "状态 1-启用 0-禁用")
    private Integer status;

    @Size(max = 255, message = "备注长度不能超过255个字符")
    @Schema(description = "备注")
    private String remark;

}
